package com.dragon.shop.user.service.impl;


import com.dragon.shop.bean.User;
import com.dragon.shop.user.mapper.UserMapper;
import com.dragon.shop.user.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @author binghe
 * @version 1.0.0
 * @description 用户业务实现类
 */
@Service
@Slf4j
/*@RpcService(interfaceClass = UserService.class, version = "1.0.0", group = "binghe")*/
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User getUserById(Long userId) {
        return userMapper.selectById(userId);
    }

    @Override
    @Async
    public void asyncMethod() {
        log.info("执行了异步任务");
    }

}
